import java.util.Scanner;

public class Solution
{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		int v = Integer.parseInt(line);
		
		line = sc.nextLine();
		int n = Integer.parseInt(line);
		
		line = sc.nextLine();
		String[] numbers = line.split(" ");
		int[] arr = new int[n];		
		
		for(int i = 0; i < n ; i++){
			arr[i] = Integer.parseInt(numbers[i]);
			if(arr[i] == v){
				System.out.println(i);
				break;
			}			
		}
    }
}